package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 分班基础信息表
 *
 * @author chenzh
 * @since 2023-08-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_class_student")
@Schema(name = "EduClassStudent", title = "分班基础信息表", description = "分班基础信息表实体类")
public class EduClassStudent extends Model<EduClassStudent> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "studentId", description = "学生id主键")
    @TableId(value = "student_id", type = IdType.ASSIGN_ID)
    private Long studentId;

    @Schema(name = "studentEnrollPreId", description = "预采集id")
    @TableField(value = "student_enroll_pre_id")
    private String studentEnrollPreId;

    @Schema(name = "studentEnrollId", description = "报名id")
    @TableField(value = "student_enroll_id")
    private String studentEnrollId;

    @Schema(name = "fullName", description = "学生姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "idcard", description = "学生身份证")
    @TableField(value = "idcard")
    private String idcard;

    @Schema(name = "cardType", description = "学生证件类型")
    @TableField(value = "card_type")
    private String cardType;

    @Schema(name = "birthYmd", description = "出生日期")
    @TableField(value = "birth_ymd")
    private String birthYmd;

    @Schema(name = "sex", description = "性别")
    @TableField(value = "sex")
    private String sex;

    @Schema(name = "age", description = "学生年龄")
    @TableField(value = "age")
    private Integer age;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "followingFlag", description = "是否非随迁子女 0 否 1 是")
    @TableField(value = "following_flag")
    private String followingFlag;

    @Schema(name = "schoolId", description = "学校")
    @TableField(value = "school_id")
    private String schoolId;

    @Schema(name = "schoolName", description = "学校名称")
    @TableField(value = "school_name")
    private String schoolName;

    @Schema(name = "schoolCategory", description = "学段")
    @TableField(value = "school_category")
    private String schoolCategory;

    @Schema(name = "schoolNature", description = "选择学校办别0.公办 1.民办")
    @TableField(value = "school_nature")
    private String schoolNature;

    @Schema(name = "configTypeName", description = "招生计划类别")
    @TableField(value = "config_type_name")
    private String configTypeName;

    @Schema(name = "configName", description = "招生类别")
    @TableField(value = "config_name")
    private String configName;

    @Schema(name = "address", description = "现居住地址")
    @TableField(value = "address")
    private String address;

    @Schema(name = "householdAddress", description = "户籍地址")
    @TableField(value = "household_address")
    private String householdAddress;

    @Schema(name = "houseAddress", description = "房产地址")
    @TableField(value = "house_address")
    private String houseAddress;

    @Schema(name = "score", description = "成绩分数")
    @TableField(value = "score")
    private BigDecimal score;

    @Schema(name = "scoreChinese", description = "语文分数")
    @TableField(value = "score_chinese")
    private BigDecimal scoreChinese;

    @Schema(name = "scoreMathematics", description = "数学分数")
    @TableField(value = "score_mathematics")
    private BigDecimal scoreMathematics;

    @Schema(name = "scoreEnglish", description = "英语分数")
    @TableField(value = "score_english")
    private BigDecimal scoreEnglish;

    @Schema(name = "specialityFlag", description = "是否特长生 1 是 0 否")
    @TableField(value = "speciality_flag")
    private String specialityFlag;

    @Schema(name = "areaCode", description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "fatherName", description = "父亲（监护人）姓名")
    @TableField(value = "father_name")
    private String fatherName;

    @Schema(name = "fatherCardType", description = "父亲（监护人）证件类型")
    @TableField(value = "father_card_type")
    private String fatherCardType;

    @Schema(name = "fatherIdcard", description = "父亲（监护人）证件号码")
    @TableField(value = "father_idcard")
    private String fatherIdcard;

    @Schema(name = "fatherCellphone", description = "父亲（监护人）手机")
    @TableField(value = "father_cellphone")
    private String fatherCellphone;

    @Schema(name = "motherName", description = "母亲姓名")
    @TableField(value = "mother_name")
    private String motherName;

    @Schema(name = "motherCardType", description = "母亲证件类型")
    @TableField(value = "mother_card_type")
    private String motherCardType;

    @Schema(name = "motherIdcard", description = "母亲身份证")
    @TableField(value = "mother_idcard")
    private String motherIdcard;

    @Schema(name = "motherCellphone", description = "母亲手机")
    @TableField(value = "mother_cellphone")
    private String motherCellphone;

    @Schema(name = "classId", description = "班级主键")
    @TableField(value = "class_id")
    private Long classId;

    @Schema(name = "serialNumber", description = "人员动态序号")
    @TableField(value = "serial_number")
    private Integer serialNumber;

    @Schema(name = "adviserId", description = "班主任id")
    @TableField(value = "adviser_id")
    private Long adviserId;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.studentId;
    }
}
